package com.dragon.modules.yuegou.model.merchant;

import com.dragon.modules.yuegou.entity.merchant.MerchantLevelRuleDetailEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 等级规则-明细模型类
 * 
 * @author pbuilder generated
 * @date 2019-09-23 15:29:06
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class MerchantLevelRuleDetail extends MerchantLevelRuleDetailEntity {

	private static final long serialVersionUID = 1L;

	/**
	 * 构造一个空等级规则-明细模型对象
	 */
	public MerchantLevelRuleDetail(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个等级规则-明细模型对象
	 * 
	 * @param entity 实体对象
	 */
	public MerchantLevelRuleDetail(MerchantLevelRuleDetailEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个等级规则-明细模型对象
	 * 
	 * @param other 其它对象
	 */
	public MerchantLevelRuleDetail(MerchantLevelRuleDetail other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置
	 * 
	 * @param id 
	 * @return 当前对象
	 */
    public MerchantLevelRuleDetail id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getLevelRuleId() {
    	return levelRuleId;
    }

    /**
	 * 设置等级ID
	 * 
	 * @param levelRuleId 等级ID
	 * @return 当前对象
	 */
    public MerchantLevelRuleDetail levelRuleId(String levelRuleId) {
    	this.levelRuleId = levelRuleId;
    	return this;
    }

	@Override
	public BigDecimal getUnitPrice() {
    	return unitPrice;
    }

    /**
	 * 设置购买单价
	 * 
	 * @param unitPrice 购买单价
	 * @return 当前对象
	 */
    public MerchantLevelRuleDetail unitPrice(BigDecimal unitPrice) {
    	this.unitPrice = unitPrice;
    	return this;
    }

	@Override
	public BigDecimal getDiscountPrice() {
    	return discountPrice;
    }

    /**
	 * 设置折扣价
	 * 
	 * @param discountPrice 折扣价
	 * @return 当前对象
	 */
    public MerchantLevelRuleDetail discountPrice(BigDecimal discountPrice) {
    	this.discountPrice = discountPrice;
    	return this;
    }

	@Override
	public LocalDateTime getStartTime() {
    	return startTime;
    }

    /**
	 * 设置折扣有效期开始日期
	 * 
	 * @param startTime 折扣有效期开始日期
	 * @return 当前对象
	 */
    public MerchantLevelRuleDetail startTime(LocalDateTime startTime) {
    	this.startTime = startTime;
    	return this;
    }

	@Override
	public LocalDateTime getEndTime() {
    	return endTime;
    }

    /**
	 * 设置折扣有效期结束日期
	 * 
	 * @param endTime 折扣有效期结束日期
	 * @return 当前对象
	 */
    public MerchantLevelRuleDetail endTime(LocalDateTime endTime) {
    	this.endTime = endTime;
    	return this;
    }

	@Override
	public Integer getPeriodValidity() {
    	return periodValidity;
    }

    /**
	 * 设置有效期限，单位：月
	 * 
	 * @param periodValidity 有效期限，单位：月
	 * @return 当前对象
	 */
    public MerchantLevelRuleDetail periodValidity(Integer periodValidity) {
    	this.periodValidity = periodValidity;
    	return this;
    }

}
